package com.qing.demo.netty;

import com.qing.demo.netty.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author caozhipeng
 * @date 2025/8/7
 */
@SpringBootApplication
@ComponentScan(basePackages = {"com.qing.demo.netty"})
public class Application implements CommandLineRunner {

    @Autowired
    private RedisUtil redisUtil;

    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
    }


    @Override
    public void run(String... args) throws Exception {
        redisUtil.clear();
    }
}
